<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Mall/TiktokPoi.js此处编写
 -->
<template>
	<div>
		<view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
		:searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend"></view-grid>
	</div>
</template>

<script>
import extend from "@/extension/mall/TiktokPoi.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
	components: {
		ViewGrid
	},
	data() {
		return {
			table: {
				key: 'id',
				footer: "Foots",
				cnName: '抖音门店',
				name: 'TiktokPoi',
				url: "/TiktokPoi/",
				sortName: "id"
			},
			extend: extend,
			editFormFields: {
				accountName:'',
				contactPhone:'',
				enable:'',
				poiTtype:'',
				serviceType:'',
				poiId:'',
				poiName:'',
				address:'',
				latitude:'',
				longitude:'',
				industryCode:'',
				headImageUrls:[],
				time:[],
				isTest:"",
				path:'',
				paramss:'',
				openStatus:'',
				weeks:'',
			},
			editFormOptions: [
				[ 
					{ title: '账户名称', field: 'accountName', type: 'text',required: true},
					{ title: '手机号', field: 'contactPhone', type: 'phone',required: true },
					{ title: '座机号', field: 'contactTel', type: 'text',}
				],
				[
					{ title: '营业时间', required: true, field: 'time', type: 'is-range', edit: { type: 'is-range', keep: true, required: true }},
					{ title: "是否为测试版小程序", field: "isTest", type: "switch", },
					{ title: '服务路径', field: 'path', type: 'text',required: true},
				],
				[
					{ title: '服务参数', field: 'paramss', type: 'text',required: true},
					{ field: 'openStatus', title: '门店营业状态',  type: 'select', dataKey: 'openStatus',required: true},
					{ field: 'weeks', title: '周几营业',  type: 'select', dataKey: '',data:[],required: true},
				],
				[
					{ field: 'poiTtype', title: '店铺类型',  type: 'select', dataKey: 'poiTtype',required: true},
					{ field: 'serviceType', title: '门店服务类型',  type: 'select', dataKey: 'serviceType',required: true},
					{ dataKey: '', data: [{value:'上线',key:1},{value:'下线',key:2}],title: '上线状态',field: 'enable',type: 'select',required: true },
				],
				[
					{ title: '抖音门店ID', field: 'poiId', type: 'text',required: true},
					{ title: '抖音门店名称', field: 'poiName', type: 'text',required: true},
					{ title: '门店地址', field: 'address', type: 'text',required: true},
				],
				[
					{ title: '门店坐标-纬度', field: 'latitude', type: 'text',required: true},
					{ title: '门店坐标-经度', field: 'longitude', type: 'text',required: true},
					{ title: '门店品类', field: 'industryCode', type: 'text',required: true},
				],
				[
					{ title: '门店头图', maxSize: 1, field: 'headImageUrls', colSize: 9, type: 'imgupgrade',maxFile: 5, multiple: true},
				]
			],
			searchFormFields: {accountName:'',contactPhone:'',enable:'',poiTtype:'',serviceType:''},
			searchFormOptions: [
				[
					{ title: '账户名称', field: 'accountName', type: 'text' },
					{ title: '手机号', field: 'contactPhone', type: 'text' },
				],
				[
					{ dataKey: '', data: [{value:'上线',key:1},{value:'下线',key:2}],title: '上线状态',field: 'enable',type: 'select' },
				],
				[
					{ field: 'poiTtype', title: '店铺类型',  type: 'select', dataKey: 'poiTtype'},
					{ field: 'serviceType', title: '门店服务类型',  type: 'select', dataKey: 'poiTtype'},
				],
			],
			columns: [
				{field:'accountName',title:'账户名称',type:'string',width:'200px'},
				{field:'poiId',title:'抖音门店ID',type:'string',width:'100px'},
				{field:'poiName',title:'抖音门店名称',type:'string',width:'200px'},
				{field:'address',title:'门店地址',type:'string',hidden:true,width:'200px'},
				{field:'appId',title:'小程序的appid',type:'string',hidden:true,},
				{field:'contactPhone',title:'手机号',type:'string',width:'100px'},
				{field:'contactTel',title:'座机号',type:'string',},
				{field:'enable',title:'上线状态',type:'int'},//1 - 上线2 - 下线
				{field:'entryType',title:'入口类型',type:'int',},//2 - 抖音小程序
				{field:'headImageUrls',title:'门店头图',type:'string',},
				{field:'industryCode',title:'门店品类',type:'string',},// code
				{field:'isTest',title:'是否为测试版小程序',type:'int',hidden:true,},//（仅联调时使用），默认否,可选值：1 - 使用测试版的小程序
				{field:'latitude',title:'门店坐标-纬度',type:'decimal'},
				{field:'longitude',title:'门店坐标-经度',type:'decimal'},
				{field:'weeks',title:'周几营业',type:'int'},//(可选值有1~7（分别对应周一到周日))
				{field:'openStatus',title:'门店营业状态',type:'string',},//0永久停业1营业中 2新店还未营业 3暂停营业
				{field:'openTimes',title:'营业时间',type:'string',hidden:true,},//必须设置7天
				{field:'paramss',title:'服务参数',type:'string',hidden:true,},//格式：json字符串
				{field:'path',title:'服务路径',type:'string',hidden:true,},//即小程序跳转链接
				{field:'poiTtype',title:'店铺类型 ',type:'int',hidden:true,},// 1 酒店民宿 2餐饮 3景区 4电商 5教育 6丽人 7爱车 8亲子 9宠物 10家装 11娱乐场所 12图文快印 13商超
				{field:'serviceType',title:'门店服务类型',type:'int',hidden:true,},// 201-预约点餐服务, 202-预约订位服务, 203-排队取号服务, 9001-门票预订服务, 9101-团购套餐服务, 9102-领优惠劵服务, 9201-在线预约服务, 9301-外卖服务, 40-住宿服务, 200-预约券服务
				{field:'startTime',title:'营业开始时间点',type:'string',},//(日期格式：HH:mm)
				{field:'endTime',title:'营业结束时间点',type:'string',},//(日期格式：HH:mm)
				{field:'taskId',title:'任务 id',type:'int',hidden:true,},
				{field:'thirdId',title:'三方门店 id',type:'string',hidden:true,},
				{field:'accountId',title:'账户ID',type:'string',sortable:true,hidden:true,},
				{field:'id',title:'主键',type:'int',hidden:true,readonly:true,require:true},
				{field:'modifier',title:'修改人',type:'string',hidden:true,},
				{field:'modifyDate',title:'修改时间',type:'datetime',sortable:true,hidden:true,},
				{field:'modifyID',title:'修改人ID',type:'int',hidden:true},
				{field:'creator',title:'创建人',type:'string',hidden:true,},
				{field:'createDate',title:'创建时间',type:'datetime',sortable:true,hidden:true,},
				{field:'createID',title:'创建人ID',type:'int',hidden:true},
			],
			detail: {
				cnName:"#detailCnName",
				columns: [],
				sortName: "",
				key:""
			}
		};
	}
};
export default vueParam;
</script>
